//
//  ZKHttpManager.h
//  ZKCompetitionApp
//
//  Created by 凯朱 on 2019/8/24.
//

#import <Foundation/Foundation.h>
#import "ZCBaseRequestManager.h"


@interface ZKHttpManager : NSObject


//上传文件
+(void)uploadFilesWithParams:(NSData *)fileData finished:(ZCRequiredFinished)finished;


+(void)postWithPath:(NSString *)path params:(NSDictionary *)params finished:(ZCRequiredFinished)finished;
+(void)postWithPath:(NSString *)path timeout:(NSInteger)timeout params:(NSDictionary *)params finished:(ZCRequiredFinished)finished;
+(void)getWithPath:(NSString *)path params:(NSDictionary *)params finished:(ZCRequiredFinished)finished;
+(void)getWithPath:(NSString *)path timeout:(NSInteger)timeout params:(NSDictionary *)params finished:(ZCRequiredFinished)finished;
+(void)deleteWithPath:(NSString *)path params:(NSDictionary *)params finished:(ZCRequiredFinished)finished;;

/*
 上报开锁记录
 unlockType: 1-蓝牙开锁  2-蓝牙远程开锁  3-指纹开锁
 unlockTime - 开锁时间戳
 unlockUid - 开锁成员id
 unlockUame - 开锁成员名称
 unlockId - 开锁id
 deviceId - 设备id
 */
+(void)uploadOpenLockRecord:(NSString *)unlockType
                 unlockTime:(NSString *)unlockTime
                  unlockUid:(NSString *)unlockUid
                 unlockUame:(NSString *)unlockUame
                   unlockId:(NSString *)unlockId
                   deviceId:(NSString *)deviceId
                     finish:(void(^)(BOOL isSuccess))finish;

/*
 批量上报开锁/告警记录- 同步用到
 */
+(void)batchUploadLogsWith:(NSArray <SLLockLogModel *>*)openLogs warnLogs:(NSArray <SLLockLogModel *>*)warnLogs finish:(void(^)(BOOL isSuccess))finish;


+(void)downloadFilesWithUrl:(NSString *)fileUrl finished:(ZCRequiredFinished)finished;

+(void)sysncDeviceDataWith:(NSDictionary *)params finished:(ZCRequiredFinished)finished;

//同步开锁方式数据到服务器
+(void)sysncKeyDataWith:(SLLockKeyModel *)keyModel finished:(ZCRequiredFinished)finished;

@end


